#pragma once
#include <map>
#include <set>
#include <memory>
#include "CTimer.h"
typedef unsigned long long ID;
class CFrameApp
{
private:
    clock_t _clock;
    std::map<ID, CTimer> _timers;
public:
    const static ID IDT_KEYLISTENER = 1;
    CFrameApp();
    virtual void onload();
    virtual void onTimer(ID ctid);
    void setTimer(ID ctid, clock_t timeout, clock_t interval, void(*func)());
    void clearTimer(ID ctid);
    void timer();
};

